package com.daojia.daojiasync.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

@Data
public class ApiResponse {

    @JsonProperty("msg")
    private String msg;

    @JsonProperty("code")
    private Integer code;

    @JsonProperty("page")
    private PageData page;

    @Data
    public static class PageData {
        @JsonProperty("currPage")
        private Integer currPage;

        @JsonProperty("list")
        private List<WorkOrderItem> list;
    }

    @Data
    public static class WorkOrderItem {
        // 这里只定义API返回的字段，可以根据实际情况调整
        @JsonProperty("address")
        private String address;

        @JsonProperty("addressDup")
        private String addressDup;

        @JsonProperty("candidate")
        private String candidate;

        @JsonProperty("candidateAttendant")
        private String candidateAttendant;

        @JsonProperty("candidateBranch")
        private String candidateBranch;

        @JsonProperty("candidatePm")
        private String candidatePm;

        @JsonProperty("carBrand")
        private String carBrand;

        @JsonProperty("companyId")
        private Integer companyId;

        @JsonProperty("companyOrderNumber")
        private String companyOrderNumber;

        @JsonProperty("createBy")
        private Integer createBy;

        @JsonProperty("createTime")
        private String createTime;

        @JsonProperty("creator")
        private Integer creator;

        @JsonProperty("dotId")
        private Integer dotId;

        @JsonProperty("dotInformationEntity")
        private DotInformationEntity dotInformationEntity;

        @JsonProperty("isDelete")
        private Integer isDelete;

        @JsonProperty("modifyTime")
        private String modifyTime;

        @JsonProperty("pmId")
        private Integer pmId;

        @JsonProperty("postcode")
        private String postcode;

        @JsonProperty("templateId")
        private Integer templateId;

        @JsonProperty("ticketStatus")
        private Integer ticketStatus;

        @JsonProperty("tslPresurvey")
        private Boolean tslPresurvey;

        @JsonProperty("userName")
        private String userName;

        @JsonProperty("userPhone")
        private String userPhone;

        @JsonProperty("userType")
        private Integer userType;

        @JsonProperty("worderExecStatus")
        private Integer worderExecStatus;

        @JsonProperty("worderExecStatusValue")
        private String worderExecStatusValue;

        @JsonProperty("worderId")
        private Integer worderId;

        @JsonProperty("worderLevel")
        private String worderLevel;

        @JsonProperty("worderNo")
        private String worderNo;

        @JsonProperty("worderStatus")
        private Integer worderStatus;

        @JsonProperty("worderStatusValue")
        private String worderStatusValue;

        @JsonProperty("worderTypeId")
        private Integer worderTypeId;

        @JsonProperty("worderTypeList")
        private List<WorderType> worderTypeList;

        @JsonProperty("worderTypeName")
        private String worderTypeName;

        // Getters and Setters
        // ... 省略getter/setter方法
    }

    @Data
    public static class DotInformationEntity {
        @JsonProperty("createTime")
        private String createTime;

        @JsonProperty("dotId")
        private Integer dotId;

        @JsonProperty("isDelete")
        private Integer isDelete;
    }

    @Data
    public static class WorderType {
        @JsonProperty("createTime")
        private String createTime;

        @JsonProperty("fullName")
        private String fullName;
    }
}